<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>HTML案例一：用户注册</title>
    <style>
        h3 {
            margin-bottom: 5px;
            text-align: center;
        }

        body {
            font-family: sans-serif;
            text-align: center;
        }

        form {
            display: inline-block;
            text-align: left;
            width: 600px;
            padding-top: 0px;
        }

        fieldset {
            border: 2px solid black;
            padding: 20px;
            margin-bottom: 20px;
        }

        caption {
            text-align: center;
        }

        legend {
            font-weight: bold;
        }
    </style>
</head>

<body>
    

    <form>
        <table class="total"></table>
        <caption>
        <h3>用户注册</h3>
        </caption>
            <tr>
                <td>
                    <fieldset>
                        <legend>身份验证-必填信息</legend>
                        <table class="table01">
                            <tr>
                                <td><label for="username">用户名</label></td>
                                <td><input type="text" id="username" name="username"></td>
                            </tr>
                            <tr>
                                <td><label for="password">密 码</label></td>
                                <td><input type="password" id="password" name="password"></td>
                            </tr>
                            <tr>
                                <td><label for="confirm_password">密码确认</label> </td>
                                <td><input type="password" id="confirm_password"></td>
                            </tr>
                        </table>
                    </fieldset>
                </td>
            </tr>


            <tr>
                <td>
                    <fieldset>
                        <legend>身份验证-选填信息</legend>
                        <table class="table02">
                            <tr>
                                <td><label for="city">所在城市</label></td>
                                <td><input type="text" id="city" name="city"></td>
                            </tr>
                            <tr>
                                <td><label for="work">工作单位</label></td>
                                <td><input type="text" id="work" name="work"></td>
                            </tr>
                            <tr>
                                <td><label for="address">家庭住址</label></td>
                                <td><input type="text" id="address" name="address"></td>
                            </tr>
                        </table>
                    </fieldset>
                </td>
            </tr>


            <tr>
                <td>
                    <fieldset>
                        <legend>其他个人信息</legend>
                        <table class="table03">
                            <tr>
                                <td>性别</td>
                                <td>
                                    <select>
                                        <option>男</option>
                                        <option>女</option>
                                    </select>
                                </td>
                            </tr>
                            <tr>
                                <td><label>爱好</label></td>
                                <td>
                                    <input type="checkbox" id="music" name="hobbys" value="music">
                                    <label for="music">音乐</label>

                                    <input type="checkbox" id="sports" name="hobbys" value="sports">
                                    <label for="sports">体育</label>

                                    <input type="checkbox" id="computer" name="hobbys" value="computer">
                                    <label for="computer">计算机</label>
                                </td>
                            </tr>
                            <tr>
                                <td>喜欢的公司</td>
                                <td>
                                    <input type="radio" name="company" value="阿里"> 阿里
                                    <input type="radio" name="company" value="字节"> 字节
                                    <input type="radio" name="company" value="百度"> 百度
                                </td>
                            </tr>
                            <tr>
                                <td>个人简介</td>
                                <td>
                                    <textarea cols="10" rows="5" name="personal"></textarea>
                                </td>
                            </tr>
                        </table>
                    </fieldset>
                </td>
            </tr>

            <tr>
                <td>
                    <input type="submit" value="提交您的资料">
                    <input type="reset" value="重新填写资料">
                </td>
            </tr>
            <tr>
                <td><input type="button" value="无效按钮" disabled></td>
            </tr>

        </table>
    </form>


</body>

</html>